% useful packages
\usepackage{comment}

% define location for all figures
\graphicspath{{figures/}}

% define colors from University of Freiburg logo (pdf version):
\definecolor{ufblue}{RGB}{10,74,143}
\definecolor{ufgray}{RGB}{209,210,207}
\definecolor{ufred}{RGB}{177,29,51}

% customize itemize and enumerate
\setbeamertemplate{itemize items}[triangle]
\setbeamertemplate{enumerate items}[default]
\setbeamercolor{itemize item}{ fg=ufblue}
\setbeamercolor{itemize subitem}{ fg=ufgray}
\setbeamercolor{itemize subsubitem}{ fg=ufgray}
\setbeamercolor{itemize subsubsubitem}{ fg=ufgray}
\setbeamercolor{enumerate item}{ fg=ufblue}
\setbeamercolor{enumerate subitem}{ fg=ufblue}
\setbeamercolor{enumerate subsubitem}{ fg=ufblue}
\setbeamercolor{enumerate subsubsubitem}{ fg=ufblue}

% update colors of block environment
\setbeamercolor{block title}{bg=ufblue,fg=white}
% \setbeamercolor{block body}{bg=ufgray,fg=black}

% add university logo on header 
\usepackage{textpos} 
\addtobeamertemplate{frametitle}{}{%
    \begin{textblock*}{300mm}(9.9cm,-1.9cm)
        \includegraphics[scale=0.06]{right_highres_transparent}
    \end{textblock*}
}

% change header color to university blue
\setbeamercolor{headline}{bg=ufblue,fg=white}
\setbeamercolor*{frametitle}{parent=headline}

% uncomment to add and modify footer
%\begin{comment}
\setbeamercolor{footlinecolor}{bg=ufblue,fg=white}
\makeatother
\setbeamertemplate{footline}
{%
	\leavevmode%
	\hbox{\begin{beamercolorbox}[wd=.4\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm]{footlinecolor}%
	\insertshorttitle
	\end{beamercolorbox}%
	\begin{beamercolorbox}[wd=.6\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{footlinecolor}%
		\usebeamerfont{author in head/foot}\insertshortauthor\hfill\insertframenumber%\insertpagenumber
	\end{beamercolorbox}}%
	\vskip0pt%
}
\makeatletter
%\end{comment}

% change title background color
\setbeamercolor{title}{bg=ufblue}

% uncomment to remove navigation buttons
\setbeamertemplate{navigation symbols}{}

% modify title slide
\newcommand{\InsertTitle}{
	{
		\setbeamertemplate{logo}{} % remove logo (if any)
		\setbeamertemplate{headline}{} % remove header (if any)
		\setbeamertemplate{footline}{} % remove footer (if any)
		\begin{frame}[noframenumbering] % do not count title frame in frame numbers
			\titlepage
			\vspace{-15pt}
			\begin{figure}
				\centering
				\includegraphics[scale = 0.25]{figures/UFlogo}
			\end{figure}
		\end{frame}
	}
}

% correct font in math mode
\usefonttheme[onlymath]{serif}
